package io.renren;

import io.renren.socket.EEs;
import io.renren.socket.Machine;
import io.renren.socket.SocketServer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

import java.io.IOException;
import java.util.ArrayList;


@SpringBootApplication
@MapperScan(basePackages = {"io.renren.dao"})
public class ApiApplication extends SpringBootServletInitializer {

	public static void main(String[] args){
			SpringApplication.run(ApiApplication.class, args);
			EEs.EquipmentEntitys=new ArrayList<>();
			EEs.machine=new Machine();
			EEs.server = new SocketServer();
			EEs.server.startSocketServer(8088);

	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
		return application.sources(ApiApplication.class);
	}
}
